package com.luozongyao.eduCms.controller;


import com.luozongyao.commonutils.R;
import com.luozongyao.eduCms.entity.CrmBanner;
import com.luozongyao.eduCms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2021-08-17
 */
@RestController
@RequestMapping("/eduCms/bannerFront")
@CrossOrigin

public class CrmBannerFrontController {

    @Autowired
    private CrmBannerService bannerService;
    //查询所有banner
    @GetMapping("getAllBanner")
    public R getAllBanner(){
        List<CrmBanner> list =bannerService.getBannerList();
        return R.ok().data("list",list);

    }


}

